using ASP;
using HoWave.Common;
using HoWave.Web;
using System;
using System.Web.Profile;
using System.Web.SessionState;
public class Click : HoWave_Root, IRequiresSessionState
{
	protected int UID;
	protected DefaultProfile Profile
	{
		get
		{
			return (DefaultProfile)this.Context.Profile;
		}
	}
	protected global_asax ApplicationInstance
	{
		get
		{
			return (global_asax)this.Context.ApplicationInstance;
		}
	}
	protected void Page_Load(object sender, EventArgs e)
	{
		this.UID = Fetch.GetID("uid");
		if (this.UID == 0)
		{
			base.Response.Redirect("/", true);
		}
		string userIp = Fetch.UserIp;
		string referrer = Fetch.Referrer;
		string text = Text.Md5(userIp + "_DflWfd_" + this.UID);
		string text2 = "<html><head><title></title><script language='javascript'>\n";
		text2 += "    if(top != self){\n";
		text2 += "        alert('不允许嵌套代码；如果您是正常浏览该网页看到此信息，请联系我们。');\n";
		text2 += "        location.href='/?err=1';\n";
		text2 += "    }else{\n";
		object obj = text2;
		text2 = string.Concat(new object[]
		{
			obj,
			"        top.location.href='/Go.aspx?uid=",
			this.UID,
			"&Sign=",
			text,
			"&ComeUrl=",
			base.Server.UrlEncode(referrer),
			"';\n"
		});
		text2 += "    }\n";
		text2 += "</script></head><body></body></html>";
		base.Response.Cookies["itnet"].Value = text;
		base.Response.Cookies["itnet"].Expires = DateTime.Now.AddHours(1.0);
		base.Response.Write(text2);
	}
}
